package com.gulimall.cart.Interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author Rookie-6688
 * @Description
 * @Create 2021-04-25 16:51
 */
@Configuration
public class MvcInterceptor implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).excludePathPatterns("/**ico").excludePathPatterns("/**error");
    }
}
